import java.util.Scanner;

public class demo03 {
    //耐摔指数
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[10000];
        int sum = 1;
        for (int i = 0; sum < n; i++) {
            sum = i + sum;
            arr[i] = sum;
        }
        sum = 1;
        int k = 0;
        for (int i = 0; sum < n; i++) {
            sum = arr[i] + sum;
            k++;
        }
        System.out.println(k);
    }
}
